<template>
	<view class="page-items">
		<img class="bg1" src="https://zrws-1327345771.cos.ap-shanghai.myqcloud.com/yanxue/index-bg1.png" alt="" />
		<img class="bg2" src="https://zrws-1327345771.cos.ap-shanghai.myqcloud.com/yanxue/index-bg2.png" alt="" />
		<view class="main">
			<!-- index_text -->
			<img class="index_text" src="https://zrws-1327345771.cos.ap-shanghai.myqcloud.com/yanxue/index_text.png" alt="" />
			<block v-for="(item, index) in items" :key="index">
				<!-- 搜索框 -->
				<block v-if="item.type === 'search'">
					<Search :itemStyle="item.style" :params="item.params" />
				</block>
				<!-- 轮播图 -->
				<block v-if="item.type === 'banner'">
					<Banner :itemStyle="item.style" :params="item.params" :dataList="item.data" />
				</block>
				<!-- 导航 -->
				<block v-if="item.type === 'navBar'">
					<NavBar :itemStyle="item.style" :params="item.params" :dataList="item.data" />
				</block>
			</block>
			<block>
				<Main />
			</block>
		</view>
	</view>
</template>

<script>
import Search from './search'
import Images from './image'
import Banner from './banner'
import Window from './window'
import Videos from './video'
import Article from './article'
import Notice from './notice'
import NavBar from './navBar'
import Goods from './goods'
import Service from './service'
import Blank from './blank'
import Guide from './guide'
import RichText from './richText'
import Main from './main'
export default {
	name: 'Page',
	components: {
		Search,
		Images,
		Banner,
		Window,
		Videos,
		Article,
		Notice,
		NavBar,
		Goods,
		Service,
		Blank,
		Guide,
		RichText,
		Main
	},
	/**
	 * 组件的属性列表
	 * 用于组件自定义设置
	 */
	props: {
		items: {
			type: Array,
			default() {
				return []
			}
		}
	}
}
</script>
<style lang="scss">
// 组件样式
.bg1 {
	height: 242rpx;
	width: 100%;
	vertical-align: top;
}
.bg2 {
	height: 378rpx;
	width: 100%;
	vertical-align: top;
}
.main {
	position: absolute;
	top: 180rpx;
	width: 100%;
	padding-bottom: 200rpx;
}
.index_text {
	width: 640rpx;
	margin: 0 auto;
	display: block;
	margin-bottom: 4rpx;
	height: 60rpx;
}
</style>
